﻿Public Class LabelEdit
    Inherits System.Windows.Forms.Label

    Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
        MyBase.OnPaint(e)

        'Add your custom paint code here
    End Sub

    Private m_hover As Color = Color.FromArgb(218, 8, 34)
    Private o_t As Color
    Public Property TextColorHover As Color
        Get
            Return m_hover
        End Get
        Set(ByVal value As Color)
            o_t = Me.ForeColor
            m_hover = value
        End Set
    End Property

    Private Sub LabelEdit_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.MouseHover
        Me.ForeColor = m_hover
    End Sub

    Private Sub LabelEdit_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.MouseLeave
        Me.ForeColor = o_t
    End Sub
End Class
